﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using MetroFramework.Forms;
using LogLib;

namespace IPCPhotoEditor
{
    public partial class FormErrorMessage : MetroForm
    {
        private string _strTitle;

        private string[] _strErrors = null;

        public FormErrorMessage(string strTitle, string[] strErrors)
        {
            _strTitle = strTitle;
            _strErrors = strErrors;
            InitializeComponent();
        }

        private void InitCtrls()
        {
            Log.WriteAsync("参数异常信息如下: ");
            labelTitle.Text = _strTitle;
            foreach (string str in _strErrors)
            {
                Log.WriteAsync(str);
                textBoxErrors.AppendText(str + Environment.NewLine);
            }
        }

        private void FormErrorMessage_Load(object sender, EventArgs e)
        {
            InitCtrls();
        }

        private void buttonOK_Click(object sender, EventArgs e)
        {
            this.Close();
        }
    }
}
